<?php

use Illuminate\Database\Seeder;

class DeviceSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $areas = App\Models\Site::get()->toArray();
        foreach ($areas as $v) {
            factory(App\Models\PriDeviceInfo::class, 1)->create([
                'dpt_id'=>8,
                'pdi_name'=>$v['name'],
                'AreaId'=>$v['id'],
                'Co_ID'=>$v['company_id']
            ]);
        }

    }
}
